package org.wisigoth.chat.client.msg;

import org.wisigoth.chat.client.Message;
import org.wisigoth.chat.client.WisigothUser;

/**
 * Define the base class of messages.
 * A typical implementation has to handle the specific message content
 * defined by its Mime type.
 * 
 * @author dtfs-tof
 *
 */
public abstract class AbstractMessage implements Message {
	
	private WisigothUser from;
	private WisigothUser to;
	private MimeType mimeType;
	
	protected AbstractMessage(WisigothUser from, WisigothUser to, MimeType mimeType){
		this.from = from;
		this.to = to;
		this.mimeType = mimeType;
	}
	
	public MimeType getMimeType() {
		return this.mimeType;
	}

	@Override
	public WisigothUser getFrom() {
		return this.from;
	}

	@Override
	public WisigothUser getTo() {
		return this.to;
	}
}
